<div class="box" id='history_div'>
  <div class="box_1">
    <?php if ($this->_var['bought_goods']): ?>
    <div class="top">买过此商品的人还买过</div>
    <div class="boxCenterList clearfix" id='history_list'>
      <?php $_from = $this->_var['bought_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'bought_goods_data');if (count($_from)):
    foreach ($_from AS $this->_var['bought_goods_data']):
?>

        <ul class="clearfix">
          <li class="goodsimg">
            <a href="<?php echo $this->_var['bought_goods_data']['url']; ?>" target="_blank">
              <img src="<?php echo $this->_var['bought_goods_data']['goods_thumb']; ?>" alt="<?php echo $this->_var['bought_goods_data']['goods_name']; ?>" class="B_blue"></a>
          </li>
          <li>
            <a class="name" href="<?php echo $this->_var['bought_goods_data']['url']; ?>" target="_blank" title="<?php echo $this->_var['bought_goods_data']['goods_name']; ?>"><?php echo $this->_var['bought_goods_data']['goods_name']; ?></a>
            <br>          
            本店售价： <font class="f1"><?php if ($this->_var['bought_goods_data']['promote_price']): ?><?php echo $this->_var['bought_goods_data']['promote_price']; ?><?php else: ?><?php echo $this->_var['bought_goods_data']['shop_price']; ?><?php endif; ?></font> 
            <br></li>
        </ul>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  
    </div>
    <?php endif; ?>
  </div>
  <div class="box_1">
    <div class="top">历史浏览记录</div>
    <div class="boxCenterList clearfix" id='history_list' >
      <?php 
$k = array (
  'name' => 'history',
);
echo $this->_echash . $k['name'] . '|' . serialize($k) . $this->_echash;
?>
    </div>
  </div>

</div>
<script type="text/javascript">
if (document.getElementById('history_list').innerHTML.replace(/\s/g,'').length<1)
{
    document.getElementById('history_div').style.display='none';
}
else
{
    document.getElementById('history_div').style.display='block';
}
function clear_history()
{
Ajax.call('user.php', 'act=clear_history',clear_history_Response, 'GET', 'TEXT',1,1);
}
function clear_history_Response(res)
{
document.getElementById('history_list').innerHTML = '<?php echo $this->_var['lang']['no_history']; ?>';
}
</script>